#ifndef __TINYSRV_CLIENT_H__
#define __TINYSRV_CLIENT_H__

#include <memory>

namespace tinySrv
{

  struct IClientCtrl
  {
    virtual ~IClientCtrl()
    {
    }
    virtual void CloseMe() = 0;
    virtual bool SendData(void const *data, int *bytes) = 0;
  };
  
  struct IClient
  {
    virtual ~IClient()
    {
    }
    virtual bool Init(IClientCtrl *ctrl) = 0;
    virtual void Done() = 0;
    virtual void OnClose() = 0;
    virtual void OnData(void const *data, int bytes) = 0;
  };

  struct IClientFactory
  {
    virtual ~IClientFactory()
    {
    }
    virtual std::auto_ptr<IClient> CreateClinetItem() = 0;
  };
}

#endif  // !__TINYSRV_CLIENT_H__
